<?php
define ('DEFAULT_CONTROLLER', 'Index');
define ('DEFAULT_ACTION', 'Home');

require_once 'Includes/Controller.php';
require_once 'Includes/DbContext.php';
require_once 'Includes/Loader.php';
require_once 'Includes/Model.php';

function autoload($class)
{
  if (file_exists($path = 'Models/'.$class.'.php') || file_exists($path = 'Controllers/'.$class.'.php'))
    require $path;
}

spl_autoload_register('autoload');

$loader = new Loader();
$loader->PageLoad();
?>